home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / pluginy Firefox / 1833 / 1833.xpi / chrome / yoono.jar / content / yoono / dialogs / search.xml < prev    next >
Extensible Markup Language  |  2009-12-16  |  2KB  |  76 lines

  1. <?xml version="1.0"?>
  2.  
  3.  
  4. <bindings id="autocompleteBindings"
  5.           xmlns="http://www.mozilla.org/xbl"
  6.           xmlns:html="http://www.w3.org/1999/xhtml"
  7.           xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
  8.           xmlns:xbl="http://www.mozilla.org/xbl">
  9.  
  10. <?xml-stylesheet href="chrome://yoono/skin/search.css" type="text/css"?>
  11.   <binding id="yoonoSearch"
  12.            extends="chrome://global/content/bindings/textbox.xml#textbox">
  13.  
  14.     <resources>
  15.           <stylesheet src="chrome://yoono/skin/search.css"/>
  16.     </resources>
  17.  
  18.     <content>
  19.  
  20.       <xul:hbox flex="1">
  21.  
  22.         <xul:hbox anonid="textbox-input-box" align="center" flex="1" xbl:inherits="tooltiptext=inputtooltiptext">
  23.  
  24.         <xul:button type="menu" anonid="yoono-searchengine-button" 
  25.             class="dropmarker" popup="_child"
  26.             xbl:inherits="src=image,value=engine">
  27.  
  28.             <xul:menupopup anonid="yoono-searchengine-popup" 
  29.             position="after_start"
  30.             oncommand="this.parentNode.parentNode.parentNode.parentNode.switchengine(event)">
  31.               <xul:menuitem label="google" value="google"
  32.                     type="checkbox"
  33.                     image="chrome://yoono/skin/favicons/google.png"/>
  34.               <xul:menuitem label="yahoo" value="yahoo"
  35.                     type="checkbox"
  36.                     image="chrome://yoono/skin/favicons/yahoo.png"/>
  37.           </xul:menupopup>
  38.           </xul:button>
  39.  
  40.           <html:input anonid="input" class="autocomplete-textbox textbox-input"
  41.                       flex="1" allowevents="true"
  42.                       xbl:inherits="tooltiptext=inputtooltiptext,onfocus,onblur,value,type,maxlength,disabled,size,readonly,userAction"/>
  43.         </xul:hbox>
  44.       </xul:hbox>
  45.       
  46.     </content>
  47.  
  48.     <implementation>
  49.     <property name="engine">
  50.         <setter><![CDATA[
  51.         var button = this;
  52.         button.setAttribute("image", "chrome://yoono/skin/favicons/" + val + ".png");
  53.         button.setAttribute("engine", val);
  54.         ]]></setter>
  55.       <getter><![CDATA[
  56.         var button = this;
  57.             return (button.getAttribute("engine"));
  58.         ]]></getter>
  59.     </property>
  60.  
  61.     <method name="switchengine">
  62.     <parameter name="aEvent"/>
  63.         <body><![CDATA[
  64.         var menuitem = aEvent.target;
  65.         var eng = menuitem.getAttribute('value');
  66.         this.engine = eng;
  67.         ]]></body>
  68.     </method>
  69.  
  70.     </implementation>
  71.  
  72.   </binding> 
  73.  
  74. </bindings>
  75.  
  76.